package cn.tedu.tmall.front.mall.service;

import cn.tedu.tamll.common.pojo.CurrentUser;
import cn.tedu.tmall.front.mall.pojo.vo.CartVO;
import org.hibernate.validator.constraints.Range;

import java.util.List;

public interface ICartService {
    void add(CurrentUser user, @Range(min = 1,message = "请输入合法的商品id") Long goodsId, @Range(min = 1,max = 100,message = "商品数量必须到1-100之间") Integer goodsNumber);

    List<CartVO> list(Long userId);

    void modify(Long userId, @Range(min = 1,message = "请输入合法的商品id") Long goodsId, @Range(min = 1,max = 100,message = "商品数量必须到1-100之间") Integer goodsNumber);

    void incr(Long userId, @Range(min = 1,message = "请输入合法的商品id") Long goodsId, @Range(min = 1,max = 100,message = "商品数量必须到1-100之间") Integer goodsNumber);

    void reduce(Long userId, @Range(min = 1,message = "请输入合法的商品id") Long goodsId, @Range(min = 1,max = 100,message = "商品数量必须到1-100之间") Integer goodsNumber);

    void pick(Long userId, @Range(min = 1,message = "请输入合法的商品id") Long goodsId);

    void pickOff(Long userId, @Range(min = 1,message = "请输入合法的商品id") Long goodsId);

    void delete(Long userId, @Range(min = 1,message = "请输入合法的商品id") Long goodsId);
}
